This invention relates to enqueue operations for multi-buffer packets.
A network processor may store newly received data packets of varying sizes in memory buffers. For example, a network processor connected to a network using the Ethernet protocol may receive packets ranging in size from 64 bytes to 1500 bytes, whereas a network processor connected to a network using the SONET protocol may receive packets ranging from 40 bytes to 1500 bytes or, in some instances, jumbo packets of more than 9 kilobytes. To avoid the use of multiple buffers to store a packet, the buffer size may be set to the size of the largest possible packet that the system can handle. However, because some packets may be small compared to the maximum packet size, allocating a memory buffer that is the maximum packet size to store each data packet is not efficient.